(deftemplate twoVar
	(slot a) (slot b)
)

(watch all)

(reset)

;Simple existence check
(defrule test-Or-1
	(or (a) (b) )
	=>
	(printout t "Atleast one of 'a'  or 'b' exists" crlf)
)

;A rule to fire once, if for every fact (a ?x), there is a fact (b ?x)
(defrule for-all-example
  (not 
	(
		and (a ?x) 
		(not 
			(b ?x)
		)
	)
  )
  =>
  (printout t "For every 'a' having a value, 'b' has the exact same value" crlf)
)

(defrule exists-demo
    (exists (honest ?))
    =>
    (printout t "There is at least one honest man!" crlf)
)

(assert (twoVar (a 13) (b 13)) )
(assert (honest 13))
;(assert (a 12) )

(run)